import { Body, Controller, Post } from '@nestjs/common'
import { ReceiveService } from './receive.service'

@Controller('receive')
export class ReceiveController {
  constructor(private readonly receiveService: ReceiveService) { }
  @Post('add')
  add(@Body() body) {
    return this.receiveService.add(body)
  }

  @Post('del')
  del(@Body() body) {
    return this.receiveService.del(body.id as number)
  }

  @Post('edit')
  edit(@Body() body) {
    return this.receiveService.update(body)
  }

  @Post('page')
  page(@Body() body) {
    return this.receiveService.getPageList(body)
  }

  @Post('getReceiveDetail')
  getReceiveDetail(@Body() body) {
    return this.receiveService.getReceiveDetail(body.receiveCode)
  }
}
